<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/10/22
 * Time: 16:05
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\model\mysql;

use app\common\lib\Status;

class Admin extends Base
{
    /**
     * @param string $blog_user
     * @param string $field
     * @return Admin|array|\think\Model|null
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getAdminByUserInfo(string $blog_user = "", string $field = '*')
    {
        return $this->field($field)
            ->where('move_user', $blog_user)
            ->where('status',Status::mysql_normal)
            ->find();
    }
}